<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.5.1.min.js"></script>
</head>
<style>
    table{
        border: 1px solid #ccc;
    }
    table tr td{
        border: 1px solid #ccc;
    }
</style>
<body>
    <h2>博士研究生导师</h2>
    <table>
        <thead>
            <tr>
                <td>姓名</td>
                <td>称呼</td>
                <td>邮箱</td>
                <td>电话</td>
                <td>领域</td>
            </tr>
        </thead>
        
        <tbody class="tbody">
            
        </tbody>
    </table>

    <h1>----------------------------------------------------------------------------</h1>

    <h2>硕士研究生导师</h2>
    <table>
        <thead>
            <tr>
                <td>姓名</td>
                <td>称呼</td>
                <td>邮箱</td>
                <td>电话</td>
                <td>领域</td>
            </tr>
        </thead>
        
        <tbody class="tbody2">
            
        </tbody>
    </table>
</body>
</html>
<script>
    var xsbh = "020"
    $.ajax({
        url:"https://yjsjygl.imut.edu.cn/gmis/(S(iwidn0uxwcx3vy25uk2l4mr1))/dsfc/dsfc_yxfy_listpageBs",
        type:"POST",
        data:{
            xsbh,
            zydm:"",
            dslbm:"",
            dsxm:"",
            pageIndex:1,
            pageSize:10000,
        },
        success:function(res){
            let data = JSON.parse(res)
            let str = ``
            data.rows.forEach((item,index)=>{
                str = `
                    <tr>
                        <td>${ item.jsxm }</td>    
                        <td>${ item.dslb }</td>    
                        <td>${ item.email }</td>    
                        <td>${ item.lxdh }</td>    
                        <td>${ item.zszymc }</td>    
                    </tr>
                `
                $(".tbody").append(str)
                
            })
            $.ajax({
                url:"https://yjsjygl.imut.edu.cn/gmis/(S(iwidn0uxwcx3vy25uk2l4mr1))/dsfc/dsfc_yxfy_listpageSs",
                type:"POST",
                data:{
                    xsbh,
                    zydm:"",
                    dslbm:"",
                    dsxm:"",
                    pageIndex:1,
                    pageSize:10000,
                },
                success:function(ress){
                    let strs = ``
                    let datas = JSON.parse(ress)
                    datas.rows.forEach((item,index)=>{
                        strs = `
                            <tr>
                                <td>${ item.jsxm }</td>    
                                <td>${ item.dslb }</td>    
                                <td>${ item.email }</td>    
                                <td>${ item.lxdh }</td>    
                                <td>${ item.zszymc }</td>    
                            </tr>
                        `
                        $(".tbody2").append(strs)
                    })
                }
            })
        }
    })
</script>